import Vue from 'vue'
import VueRouter from 'vue-router'
import index from '../components/day06/router/index.vue'
// import school from '../components/day06/router/school.vue'
Vue.use(VueRouter)
const router = new VueRouter({
    routes:[
        {
            path:'/',
            redirect: {name:'index'}
        },
        {
            name:'index',
            path:'/index',
            component:index
        },
        {
            // name:'/school',
            path:'/school/:id',
            component:()=>import('../components/day06/router/school.vue'),
            props:true,
            children:[
                {
                    // name:'xueyuan'
                    path:'xueyuan',
                    component:()=>import('../components/day06/router/xueyuan.vue'),
                }, 
                {
                    path:'jiuye',
                    component:()=>import('../components/day06/router/jiuye.vue'),
                }
            ]
        }
    ]
})
export default router